package mainService.services;

import java.util.ArrayList;

import mainService.HTTPService;
import mainService.ServiceParams;
import mainService.data.IpClient;
import mainService.data.UsersConnected;

/**
 * Servizio di Logout di un utente
 * 
 * @author Daniel Procop, Mattia Grecchi
 */
public class LogoutService implements HTTPService {

	@Override
	public ArrayList<String> getServiceResult(ServiceParams params) {

		UsersConnected.getUsersConnected().removeUsers(
				IpClient.getSingleton().getIp());

		params.addParam("file", "home.html");
		return (new HttpFileServer()).getServiceResult(params);
	}
}
